package ca.jsbr.as2js_lib.display.canvas 
{
	import js.window;
	/**
	 * ...
	 * @author 
	 */
	public class StageDescription 
	{
		static public const RENDER_ALL:String = "redraw_all";
		static public const RENDER_GRID:String = "redraw_grid";
		static public const RENDER_ZONE:String = "render_zone";
		
		static public const REPAINT_BROWSER:String = "repaint_browser";
		static public const REPAINT_FIX:String = "repaint_fix";
		static public const REPAINT_ADAPTABLE:String = "repaint_adaptable";
	
		
		private var _fps:Number
		private var _renderMode:Number;
		private var _stageId:String;
		private var _gridSize:int = 32;
		private var _repaintMode:String;
		
		
		public function StageDescription(stageId:String = null, repaintMode:String = REPAINT_FIX, fps:int = 24, renderMode:String = RENDER_ALL)
		{
			_stageId = stageId;
			_renderMode = renderMode;
			_fps = fps;
			_repaintMode = repaintMode;
			if (_repaintMode == REPAINT_BROWSER)
			{
				window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame
				if (!window.requestAnimFrame)
					_repaintMode = REPAINT_FIX
			}
		}
		
		public function get stageId():String 
		{
			return _stageId;
		}
		
		public function get renderMode():Number 
		{
			return _renderMode;
		}
		
		public function get repaintMode():String 
		{
			return _repaintMode;
		}
		
		public function get fps():Number 
		{
			return _fps;
		}
		
		public function set fps(value:Number):void 
		{
			_fps = value;
		}
		
	}

}